#include<iostream>
#include<vector>
using namespace std;
int main(){
    vector<pair<string,string> > res;
    int n;
    cin>>n;
    int i=0;
    while(i<n){
        string username,passwd;
        cin>>username>>passwd;
        bool flag=false;
        for(int j=0;j<passwd.length();j++){
            char c = passwd[j];
            if(c=='1'){
                passwd[j]='@';
                flag=true;
            }
            if(c=='0'){
                passwd[j]='%';
                flag=true;
            }
            if(c=='l'){
                passwd[j]='L';
                flag=true;
            }
            if(c=='O'){
                passwd[j]='o';
                flag=true;
            }
        }
        if(flag){
            res.push_back(pair<string,string>(username,passwd));
        }
        i++;
    }
    if(res.size()==0){
        if(n==1)
            cout<<"There is 1 account and no account is modified";
        else
            cout<<"There are "<<n<<" accounts and no account is modified";
    }else{
        cout<<res.size()<<endl;
        for(int i=0;i<res.size();i++){
            cout<<res[i].first<<" "<<res[i].second<<endl;
        }
    }
    return 0;
}
